package com.coursehub.course.service;

import com.coursehub.course.entity.Course;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;

import java.util.List;
import java.util.Optional;

public interface CourseService {
    
    Course createCourse(Course course);
    
    Optional<Course> getCourseById(Long id);
    
    List<Course> getAllCourses();
    
    Page<Course> getCoursesPaginated(Pageable pageable);
    
    List<Course> getCoursesByTeacherId(Long teacherId);
    
    Page<Course> getCoursesByTeacherId(Long teacherId, Pageable pageable);
    
    List<Course> getPublishedCourses();
    
    Page<Course> getPublishedCourses(Pageable pageable);
    
    Course updateCourse(Long id, Course courseDetails);
    
    void deleteCourse(Long id);
    
    boolean existsByCourseCode(String courseCode);
    
    Long countByTeacherId(Long teacherId);
    
    Long countPublishedCourses();
}